<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>bootstrap</title>
    <link rel="stylesheet" href="css/bootstrap.min.css">
</head>
<body>
<h2>cafghjkl</h2>
<button id="btn" class="btn btn-info" title="这是一个提示信息" data-toggle="tooltip" >按钮</button>
<script src="js/jquery-3.6.0.min.js"></script>
<script src="js/bootstrap.min.js"></script>
<script>
$(function(){
    $("#btn").tooltip(); 
    $("#btn").on("show.bs.tooltip",function(){
        alert(1);
    })
})
</script>

</body>
</html>